﻿import sys
import nt

cwd = nt.getcwd()
svnpath = cwd[: cwd.index(r'\Svn') + 5]

print "Linking to Python..."

sys.path.append(svnpath)
sys.path.append(svnpath + r'SunRayEngine\SunRayEngineTest\SunRayEngineTest\SunRayEngineTest\Python')

from sunray.srpy import Srpy
from init import grabsettings, compsettings
import cmds

pylink = Srpy(game, managerlist = open(svnpath + r'SunRayEngine\SunRayEngineTest\SunRayEngineTest\SunRayEngineTest\PyManagers.txt', 'r').readlines())

print "Link established."

settings = grabsettings()

compsettings(game, settings)

cmds.game = game
cmds.setscripts(pylink['ScriptManager'])